package meituan;

import java.util.Arrays;
import java.util.Scanner;

public class Main2 {
    public static void main(String[] args) {
        int n;
        Scanner scanner=new Scanner(System.in);
        n=scanner.nextInt();
        int[] a=new int[n];
        int max=0;
        int index=0;
        Arrays.sort(a);
        for(int i=0;i<n;++i){
            a[i]=scanner.nextInt();
            int t=panD(a[i]);
            if(t>max){
                max= t;
                index=i;
            }
        }
        System.out.println(max);
    }

    public static int panD(int num){
        for(int i=1;i<10;++i){
            if(num%Math.pow(2,i)==0){
                continue;
            }
            return i-1;
        }
        return 1;
    }
}
